<template> 
	<view class="container flex-row-center" @click="backAction">
		<image  class="back-img" src="../../static/back-img.png"></image>
		<view class="title">{{title}}</view>
	</view>
</template>

<script>
	import dsBridge from 'dsbridge'
	export default {
		name:"navigationBar",
		props:{
			title:{
				type:String,
				default:'盲盒免单'
			},
			backgroundColor:{
				type:String,
				default:'white'
			},
			titleColor:{
				type:String,
				default:'white'
			},
			backImage:{
				type:String,
				default:'/static/images/shop/back.png'
			},
			rightImage:{
				type:String,
				default:''
			},
			rightTxt:{
				type:String,
				default:''
			},
			rightTxtColor:{
				type:String,
				default:'#09C1F0'
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			backAction(){ 
				//查看规则
				uni.navigateBack()
			if(getCurrentPages().length==1)
							dsBridge.call("back")
			},
			rightAction(){
				this.$emit("rightAction")
			}

		}
	}
</script>

<style lang="scss" scoped>
	
	 

	.container{
		width: 100%;
		height: 88rpx;
		position: relative;
		background-color: #38C09E;
		box-sizing: content-box;
 	}
	.back-img{
		padding-left: 22rpx;
		padding-right: 14rpx;
		width: 30rpx;
		height: 36rpx;
		z-index: 1;
	}
	.title{
		align-items: center;
		width: 100%;
		padding-right: 60rpx;
		box-sizing: border-box;
		color: rgba(255, 255, 255, 1);
		font-size: 36rpx;
		text-align: center;
	}
</style>